<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">

<title>绑定医保网账户页面</title>

<!-- Bootstrap core CSS -->
<link href="<%=basePath%>/css/bootstrap.min.css" rel="stylesheet">

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link href="<%=basePath%>/css/ie10-viewport-bug-workaround.css"
	rel="stylesheet">

<!-- Custom styles for this template -->
<link href="<%=basePath%>/css/signin.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="<%=basePath%>/js/ie-emulation-modes-warning.js"></script>
<script src="<%=basePath%>/js/base64.js"></script>
<script type="text/javascript" src="<%=basePath%>/js/jquery.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<link href="<%=basePath%>css/justified-nav.css" rel="stylesheet">
<script language="javascript">
	function toVaild() {
		var SKUSERNAMENO64= document.getElementById("SKUSERNAME").value;
		var SKUSERNAME =encode64(SKUSERNAMENO64);
		
		var SKPASSWDNO64=document.getElementById("SKPASSWD").value;
		var SKPASSWD = encode64(SKPASSWDNO64);
		var logincertCode = document.getElementById("logincertCode").value;

		var htmlobj = $.ajax({
			url : "<%=basePath%>dosomequery?querytype=bindsk&SKUSERNAME="
					+ SKUSERNAME + "&SKPASSWD=" + SKPASSWD + "&logincertCode="
					+ logincertCode + "&SKUSERNAMENO64=" + SKUSERNAMENO64
					+ "&SKPASSWDNO64=" + SKPASSWDNO64,
			async : false
		});
		//alert(htmlobj.responseText);
		//return false;
		if (htmlobj.responseText.indexOf('ok') != -1) {
			alert('绑定成功');
			return true;
		} else {
			alert('绑定失败:' + htmlobj.responseText)
			return false;
		}

	}

	$(document).ready(function() {
		/*  $("#randImage").bind("click",function(){
		  	
		  	 
		  	$(this).attr('src',"dosomequery?querytype=verifycode&id="+Math.random());//
		  	;
		  });*/

	});
</script>
</head>

<body>
	<div class="masthead">

		<nav>
			<ul class="nav nav-justified">
				<li class="active"><a href="<%=basePath%>SigninServlet">首页</a></li>
				<li><a href="<%=basePath%>jsp/signin.jsp">退出</a></li>
				<li><a href="<%=basePath%>jsp/regist.jsp">注册</a></li>
				<li><a href="http://www.shdc.org.cn/familyServices/index">上海市医院报告查询和门诊预约</a></li>
				<li><a href='<%=basePath%>jsp/downrj.jsp'>下载仁济app</a></li>
			</ul>
		</nav>
	</div>
	<div class="container">

		<form class="form-signin" action="<%=basePath%>dosomequery"
			method="get" onsubmit="return toVaild()">

			<h3 class="form-signin-heading">请先绑定医联网注册账户!，必须绑定才能查看报告</h3>
			请输入医联网用户名<input name="SKUSERNAME" id="SKUSERNAME" type="text"
				class="form-control" placeholder="医联网用户名" required autofocus>
			请输医联网密码<input name="SKPASSWD" type="text" id="SKPASSWD"
				class="form-control" placeholder="医联网密码" required autofocus>
			<input type='text' style='display: none' value='skinput'
				name='querytype'> <input type="text" placeholder="请输入验证码"
				size="6" maxlength="6" id="logincertCode" name="logincertCode"
				style="width: 100px;"> <a> <img
				onclick="javascript:this.src='<%=basePath%>SigninServlet?type=code&id='+ Math.random();"
				height="50" width="150" align="absmiddle" alt="换一个" id="randImage"
				src="<%=basePath%>SigninServlet?type=code&id="+ Math.random()"></img>
				<!--  <img height="50" width="150" align="absmiddle" alt="换一个" onclick="javascript:this.src='http://yuyue.shdc.org.cn/verifycode.xujie?id='+ Math.random();" src="http://yuyue.shdc.org.cn/verifycode.xujie?id='+ Math.random();" id="randImage">-->
			</a>
			<button class="btn btn-lg btn-primary btn-block" type="submit">绑定</button>

		</form>
		<p>
			截图里面的红圈圈的用户名密码填到绑定框框里,第一次用点最上面的<a
				href="http://www.shdc.org.cn/familyServices/index"><font
				color='blue'>“上海市医院报告查询和门诊预约”</font></a>注册一下
		</p>
		<img src="<%=basePath%>jsp/sklog.png" alt="截图里面的红圈圈的用户名密码填到绑定框框里" />
		<img src="<%=basePath%>jsp/skbind.png" alt="注册了以后还得绑定你的门诊卡" />
	</div>
	<!-- /container -->


	<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
	<script src="<%=basePath%>/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
